<template>
    <div class="cms-nav-bar">
        <span class="iconfont icon-left_arrow"  @click="goBack"></span>
        <h2>{{title}}</h2>
    </div>
</template>
<script>
export default {
    name:'nav-bar',
    props:['title'],
    methods: {
        goBack(){
            this.$router.go(-1)
        }
    },
}
</script>
<style lang="scss" scoped>
.cms-nav-bar{
    width: 100%;
    height: 2.45rem;
    line-height: 2.45rem;
    background: #82529D;
    position: relative;
    z-index: 9;
    font-size: .8rem;
    color:#fff;
    text-align: center;
    span{
        width: 2.45rem;
        height: 2.45rem;
        position: absolute;
        background: none;
        top:0;
        left:.35rem;
        z-index: 99;
    }
    h2{
        width: 100%;
        position: absolute;
        top: 0;
        left:0;
    }

}
    
</style>
